package com.cstp.web.res;


import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.cstp.entity.Prize;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * @author watts
 */
@Data
public class PrizeResp {

    @TableId(type = IdType.AUTO)
    private Long id;

    private String name;

    @Schema(description = "1是跳转url 2是抽取")
    private Integer type;

    private String jumpUrl;

    private String remark;

    public static PrizeResp of(Prize prize) {
        PrizeResp p = new PrizeResp();
        BeanUtil.copyProperties(prize, p);
        return p;
    }
}
